<?php
namespace  Aitels\Foundation\Annotation;


class AnnotationReader
{
    public function read(\ReflectionMethod $method, AnnotationInterface $annotation)
    {
        $matches = [];
        preg_match_all($annotation->patten(), $method->getDocComment(), $matches);
        return $annotation->processMatches($matches);
    }
}